import React, {  } from 'react';
import { makeStyles } from '@material-ui/core/styles';
import {  Banner , VotingMain} from './components';
import {  useDispatch } from 'react-redux'
import { useLocation } from 'react-router-dom/cjs/react-router-dom';

const useStyles = makeStyles(theme => ({
  content: {
    backgroundColor: "#000",
  },
}));

const VotingDetail = () => {
  const classes = useStyles();
  const dispatch = useDispatch();
  const location = useLocation()

  const voteItemData = location.state

  return (
    <div className={classes.content}>
      <Banner data={voteItemData} />
      <VotingMain data={voteItemData} />
    </div>
  );
};

export default VotingDetail;
